app.directive('showPhone', function() {
    return {
        restrict: 'E',
        template: '***************',
        transclude: true,
        link: function(scope, elem, attrs) {
            if(attrs.mobile==""||attrs.mobile==null||attrs.mobile=="--"){
                elem.text("--");
            }else{
                scope.txt="***************";
                elem.bind('click', function() {
                    if(elem.text()==scope.txt){
                        $("show-phone").each(function(){
                            if($(this).text()!='--'){
                                $(this).text(scope.txt)
                            }
                        })
                        elem.text(attrs.mobile);
                    }else{
                        elem.text(scope.txt)
                    }
                });
            }
        }
    };
});